package com.zyf.chapter01.principle.SOLID.LSP;

import com.zyf.chapter01.principle.SOLID.LSP.utils.HttpClient;
import com.zyf.chapter01.principle.SOLID.LSP.utils.Request;
import com.zyf.chapter01.principle.SOLID.LSP.utils.Response;

/**
 * @author yifeng
 */
public class Demo {
    public void demoFunction(Transporter transporter) {
        Request request = new Request();
        //... 省略设置request中数据值的代码...
        Response response = transporter.sendRequest(request);
        //...省略其他逻辑...
    }

    public static void main(String[] args) {
        Demo demo = new Demo();
        demo.demoFunction(new SecurityTransporter(new HttpClient(), "", ""));
    }
}
